
<%@ include file="../common/top.jsp"%>


<%@ page contentType="text/html;charset=UTF-8" language="java"  autoFlush="false"  buffer="100kb"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>用户登录</title>
    <link rel="stylesheet" type="text/css" href="css/register.css">
    <script src="https://kit.fontawesome.com/5a681e6fdb.js" crossorigin="anonymous"></script>

    <!-- 2. jQuery导入，建议使用1.9以上的版本 -->
    <script src="js/jquery-2.1.0.min.js"></script>
    <!-- 3. 导入bootstrap的js文件 -->
    <script src="js/bootstrap.min.js"></script>
    <script type="text/javascript">
        //切换验证码
        function refreshCode(){
            img=document.getElementById("vcode"); //获取验证码图片对象
            var time=new Date().getTime();  //时间戳
            img.src="${pageContext.request.contextPath }/checkcode?"+time;
        }
    </script>




<div class="w">
    <div class="user-content">
        <div class="user-title">
            ${sessionScope.isLogin=="true" ? "注册" : "注册"}
        </div>
        <form action="register" class="user-form" method="POST">
            <c:if test="${requestScope.registerMsg != null}">
                <div class="user-form-error">
                    <i class="fa-solid fa-circle-exclamation error-icon" ></i>
                    <p class="error-msg">${requestScope.registerMsg}</p>
                </div>
            </c:if>
            <div class="column1" >
                <div class="user-form-item">
                    <label for="username" class="user-form-label">
                        <i class="fa-solid fa-user"></i>
                    </label>
                    <input type="text" class="user-form-input" name="username" id="username" placeholder="Please enter your username" autocomplete="off">
                </div>
                <div class="user-form-item">
                    <label for="password" class="user-form-label">
                        <i class="fa-solid fa-lock"></i>
                    </label>
                    <input type="password" class="user-form-input" name="password" id="password" placeholder="Please enter your password" autocomplete="off">
                </div>
                <div class="user-form-item">
                    <label for="repeatPassword" class="user-form-label">
                        <i class="fa-solid fa-lock"></i>
                    </label>
                    <input type="password" class="user-form-input" name="repeatPassword" id="repeatPassword" placeholder="Please enter your password again" autocomplete="off">
                </div>
                <div class="user-form-item">
                    <label for="email" class="user-form-label">
                        <i class="fa-solid fa-envelope"></i>
                    </label>
                    <input type="text" class="user-form-input" name="email" id="email" placeholder="Please enter your email" autocomplete="off">
                </div>
                <div class="user-form-item">
                    <label for="firstname" class="user-form-label">
                        <i class="fa-solid fa-signature"></i>
                    </label>
                    <input type="text" class="user-form-input" name="firstname" id="firstname" placeholder="Please enter your firstname" autocomplete="off">
                </div>
                <div class="user-form-item">
                    <label for="lastname" class="user-form-label">
                        <i class="fa-solid fa-signature"></i>
                    </label>
                    <input type="text" class="user-form-input" name="lastname" id="lastname" placeholder="Please enter your lastname" autocomplete="off">
                </div>
                <div class="user-form-item">
                    <label for="listOption">是否要展示购物车：</label>
                    <select name="listOption" id="listOption">
                        <option value="1">是</option>
                        <option value="0">否</option>
                    </select>
                </div>
                <div class="user-form-item">
                    <label for="vcode1">验证码：</label>
                    <input type="text" class="user-form-inputvcode" name="vcode" id="vcode1" placeholder="请输入验证码" autocomplete="off">
                    <a href="javascript:refreshCode()"><img src="${pageContext.request.contextPath }/checkcode" title="看不清点击刷新" id="vcode"/></a>
                </div>

            </div>

            <div class="column2" >


                <div class="user-form-item">
                    <label for="add1" class="user-form-label">
                        <i class="fa-solid fa-location-dot"></i>
                    </label>
                    <input type="text" class="user-form-input" name="add1" id="add1" placeholder="Please enter your address1" autocomplete="off">
                </div>


                <div class="user-form-item">
                    <label for="add2" class="user-form-label">
                        <i class="fa-solid fa-location-dot"></i>
                    </label>
                    <input type="text" class="user-form-input" name="add2" id="add2" placeholder="Please enter your address2" autocomplete="off">
                </div>

                <div class="user-form-item">
                    <label for="state" class="user-form-label">
                        <i class="fa-solid fa-map-location-dot"></i>
                    </label>
                    <input type="text" class="user-form-input" name="state" id="state" placeholder="Please enter your state" autocomplete="off">
                </div>

                <div class="user-form-item">
                    <label for="phone" class="user-form-label">
                        <i class="fa-solid fa-phone"></i>
                    </label>
                    <input type="text" class="user-form-input" name="phone" id="phone" placeholder="Please enter your phone" autocomplete="off">
                </div>

                <div class="user-form-item">
                    <label for="zip" class="user-form-label">
                        <i class="fa-solid fa-envelopes-bulk"></i>
                    </label>
                    <input type="text" class="user-form-input" name="zip" id="zip" placeholder="Please enter your zip" autocomplete="off">
                </div>

                <div class="user-form-item">
                    <label for="country" class="user-form-label">
                        <i class="fa-solid fa-earth-asia"></i>
                    </label>
                    <input type="text" class="user-form-input" name="country" id="country" placeholder="Please enter your country" autocomplete="off">
                </div>
                <div class="user-form-item">
                    <label for="favouriteCategoryId">最喜爱的动物：</label>
                    <select name="favouriteCategoryId" id="favouriteCategoryId">
                        <option value="CATS">CATS</option>
                        <option value="DOGS">DOGS</option>
                        <option value="BIRDS">BIRDS</option>
                        <option value="FISH">FISH</option>
                        <option value="REPTILES">REPTILES</option>
                    </select>
                </div>

                <div class="user-form-item">
                    <label for="bannerOption">是否要展示推荐：</label>
                    <select name="bannerOption" id="bannerOption">
                        <option value="1">是</option>
                        <option value="0">否</option>
                    </select>
                </div>
                <div class="user-form-item">
                    <input type="submit" value="注册" class="user-form-submit">
                </div>
                <div class="user-form-link">
                    <a href="signonForm" class="link">去登录>></a>
                </div>


            </div>




        </form>
    </div>

</div>





<%--<div id="Catalog">--%>
<%--    <form action="register" method="post">--%>
<%--        <p>Please enter your information.</p>--%>
<%--        <c:if test="${requestScope.registerMsg != null}">--%>
<%--            <p> <font color="red">${requestScope.signOnMsg} </font> </p>--%>
<%--        </c:if>--%>
<%--        <p>--%>
<%--            Username:<input type="text" name="username"> <br />--%>
<%--            Password:<input type="password" name="password"> <br />--%>
<%--            email:<input type="text" name="email"> <br />--%>
<%--            firstname:<input type="text" name="firstname"> <br />--%>
<%--            lastname:<input type="text" name="lastname"> <br />--%>
<%--            addr1:<input type="text" name="addr1"> <br />--%>
<%--            addr2:<input type="text" name="addr2"> <br />--%>
<%--            state:<input type="text" name="state"> <br />--%>
<%--            phone:<input type="text" name="phone"> <br />--%>
<%--            zip:<input type="text" name="zip"> <br />--%>
<%--            country:<input type="text" name="country"> <br />--%>
<%--            verification:<input type="text" name="verification">--%>

<%--        </p>--%>
<%--        <input type="submit" value="Login">--%>
<%--    </form>--%>

<%--</div>--%>

<%@ include file="../common/bottom.jsp"%>